Allow for certificates to be expanded to include new domains #208
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#49 has been stale since 2020 (but somehow not closed by the stale bot), and #180 and #171 were both closed by the stale bot.
In comparison to #180, this PR only adds
--expand
if explicitly set to do it with a new var,certbot_expand
, as well as letting certbot handle parsing of existing domains instead of handling it through ansible.We also check if any changes were made when running
certbot
by checking if its output contains "no action taken" or not instead of trying to save any state, keeping the entire role stateless.We removed the task "Check if certificate already exists." because as mentioned above, certbot will gracefully handle if the cert already exists, and we check for that by looking for the aforementioned string.